package cn.com.bluemoon.daps.sync.vo.syncmanage;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author Jarod.Kong
 * @date 2021/6/17 13:57
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel(description = "同步管理列表信息")
public class SyncManageOut implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务表id")
    private String taskId;

    @ApiModelProperty("行id（任务表id）")
    private String taskTableId;

    @ApiModelProperty("变更单号")
    private String changeOrder;

    @ApiModelProperty("变更描述")
    private String changeDesc;

    @ApiModelProperty("模型id")
    private String modelId;

    /**
     * 需要基于逻辑写入模型名称
     */
    @ApiModelProperty("模型名称")
    private String modelName;

    @ApiModelProperty("表英文名")
    private String tableName;

    @ApiModelProperty("预发布状态，0：未同步、1：同步中、2：已同步、3：同步失败，")
    private Integer preProdSyncStatus;

    @ApiModelProperty("生产状态，0：未同步、1：同步中、2：已同步、3：同步失败，")
    private Integer prodSyncStatus;

    @ApiModelProperty(value = "执行人")
    private String syncBy;

    @ApiModelProperty("是否DBA介入, true：是，false/null：否")
    private Boolean needDba = Boolean.FALSE;

    @ApiModelProperty(value = "DBA")
    private String dbaManageBy;

    @ApiModelProperty(value = "处理时间", example = "1970-01-01 00:00:00")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private LocalDateTime dbaManageTime;

    @ApiModelProperty("标记模型是否已被删除，true为已删除，false为存在")
    private Boolean deletedModel;
}
